#include "StdAfx.h"
#include "MeshSceneEditorObject.h"
#include "OgreLaunchApp.h"

CMeshSceneEditorObject::CMeshSceneEditorObject(void):mpInstanceMgr(NULL),mnInstanceSize(1000)
{
	m_nType = SOT_MESH ;
}


CMeshSceneEditorObject::~CMeshSceneEditorObject(void)
{
}

void CMeshSceneEditorObject::Init() 
{

}

Ogre::InstancedEntity* CMeshSceneEditorObject::CreateInstanceMesh()
{
	Ogre::InstancedEntity* retEntity = mpInstanceMgr->createInstancedEntity( mStrDefaultMaterial ) ;
	retEntity->setPosition( Ogre::Vector3(100,100,100) ) ;
	return retEntity ;
}

Ogre::Entity* CMeshSceneEditorObject::CreateMesh() 
{
	Ogre::Entity* pEntity = COgreLaunchApp::getSingletonPtr()->getSceneManagerPtr()->createEntity( meshname ) ;
	pEntity->setRenderQueueGroup( RENDER_GROUP_ID_MESH ) ;
	return pEntity ;
}